package com.car.common;

import java.util.HashSet;
import java.util.Set;

/** 
 * 数据库中常用的一些常量
 * @author fulingjin E-mail: fulingjin@gmail.com
 * @version 1.0 Date：2015年11月22日 下午4:53:55 
 * Comment：
 */
public class CtrlerFinals {
	//数据库字段的长度限制=================================================================
	public static final int TID_MAX_LENGTH 			= 45;
	public static final int USERID_MAX_LENGTH 		= 20;
	public static final int DEVICEID_MAX_LENGTH 	= 45;
	public static final int PARKINGID_MAX_LENGTH 	= 45;
	public static final int RESID_MAX_LENGTH 	    = 64;
	public static final int COVERID_MAX_LENGTH      = 64;
	public static final int GALLERYID_MAX_LENGTH 	= 45;
	public static final int GALLERYPOSITIONID_MAX_LENGTH = 45;
	public static final int FAVID_MAX_LENGTH 	    = 45;
	public static final int LATLON_DIGIT_LENGTH 	    = 5;
	
	public static final int GENERAL_MAXLEN_ID 	    = 64;
	public static final int GENERAL_MAXLEN_TITLE	    = 128;
	public static final int GENERAL_MAXLEN_CONTENT	    = 1024;
	public static final int GENERAL_NUMBER_INITTHRESH_5	    = -5;
	public static final int GENERAL_NUMBER_INITTHRESH_1	    = -1;
	public static final int ALIPAY_RESULT_STATUS = 9000;
	
	//request返回的data key名称==================================================================

    public final static String DATA_GLOBAL_SUC = "success";
    public final static String DATA_GLOBAL_WARN = "nowarning";
    public final static String DATA_GLOBAL_PASS = "pass";
    public final static String DATA_GLOBAL_CNT = "count";
    public final static String DATA_GLOBAL_CNT_2YEAR = "count2";
    public final static String DATA_GLOBAL_EXTRA = "extra";
    
    public final static String DATA_STRING_VERIFY = "verify";
    public final static String DATA_STRING_SIGN = "sign";
    
	public static final String DATA_GALLERY_GALLERYID = "galleryid";
	public static final String DATA_GALLERY_GALLERYINFOLIST = "galleryinfolist";
	public static final String DATA_GALLERY_GALLERYTRIPLIST = "gallerytriplist";
	public static final String DATA_GALLERY_GALLERYINFO = "galleryinfo";
	public static final String DATA_GALLERY_RESINFOLIST = "resinfolist";
	
	public static final String DATA_TRIP_TRIPINFOLIST = "tripinfolist";
	public static final String DATA_TRIP_TRIPINFO = "tripinfo";
	public static final String DATA_TRIP_RESLIST = "reslist";
	
	
	public static final String DATA_USER_USERLIST = "userlist";
	public static final String DATA_USER_USER = "user";
	public static final String DATA_USER_USERID = "userid";
	public static final String DATA_USER_PROFILE = "profile";
	public static final String DATA_USER_LOC = "loc";
	public static final String DATA_USER_BATTERY = "battery";
	public static final String DATA_USER_CLUB = "club";
	public static final String DATA_USER_TOKEN = "token";
	public static final String DATA_USER_3rdTOKEN = "third_token";
	
	public static final String DATA_USER_USERRTMODEL = "userrtmodel";
	
	public static final String DATA_USER_LEVEL = "level";
	public static final String DATA_CLUB_CLUB = "club";
	public static final String DATA_CLUB_ADMIN = "admin";
	public static final String DATA_CLUB_CLUBID = "clubid";
	public static final String DATA_CLUB_LIST = "list";
	public static final String DATA_4S_LIST = "4slist";
	public static final String DATA_CLUB_CLUBLIST = "clublist";
	public static final String DATA_CLUB_CLUBFROMUS = "clubfromus";
	public static final String DATA_CLUB_CLUBFROMTHEM = "clubfromthem";
	
	public static final String DATA_CONSUMPTION_DEALERLIST = "dealerlist";
	public static final String DATA_CONSUMPTION_CONSUMPTIONLIST = "consumptionlist";
	public static final String DATA_CONSUMPTION_USER_CONSUMPTIONLIST = "userconslist";
	public static final String DATA_CONSUMPTION_USER_CONSUMPTION = "usercons";
	public static final String DATA_CONSUMPTION_CONSUMELIST =  "consumelist";
	
	public static final String DATA_TASK_LIST =  "tasklist";
	public static final String DATA_USER_MAINTAINLIST = "maintainlist";
	
	public static final String DATA_USERCONSUMPTION_UCID = "ucid";
	public static final String DATA_USERCONSUMPTION_GROUPID = "groupid";
	public static final String DATA_USERCONSUMPTION_GROUPIDLIST = "grouplist";
	public static final String DATA_USERCONSUMPTION_MILEAGELEVENLIST = "mileagelevellist";
	public static final String DATA_USERCONSUMPTION_ONEGROUPIDLIST = "onegrouplist";
	public static final String DATA_USERCONSUMPTION_GROUPMILELIST = "groupmilelist";
	
	public static final String DATA_CASH_LUCKYMONEY_NATCHLIST = "redpartlist";
	public static final String DATA_CASH_RED_ONE = "redinfo";
	
	public static final String DATA_CLUB_APPLYID = "applyid";
	public static final String DATA_CLUB_APPLYLIST = "clubapplylist";
	
	public static final String DATA_SQUARE_RECOM = "recom";
	
	public static final String DATA_COMMENT_COMMENTLIST = "commentlist";
	public static final String DATA_COMMENT_COMMENTID = "commentid";
	
	public static final String DATA_FAVORITE_FAVTOID = "favtoid";
	public static final String DATA_FAVORITE_ISUPVOTE = "isupvote";
	public static final String DATA_FAVORITE_FAVIDLIST = "favlist";
	public static final String DATA_FAVORITE_BATCHFAVIDLIST = "batchfavlist";
	public static final String DATA_FAVORITE_FAVID = "favid";	
	
	public static final String DATA_ZONE_FOOTMARK= "footmark";
	public static final String DATA_ZONE_RESLIST= "reslist";
	public static final String DATA_ZONE_JAMS= "jams";
	public static final String DATA_ZONE_USERDISTRIBLIST= "userlist";
	public static final String DATA_ZONE_USERLOCLIST= "userlocist";
	public static final String DATA_ZONE_RESLOCLIST= "reslocist";
	
	public static final String DATA_TRAFFIC_FROM= "from";
	public static final String DATA_TRAFFIC_TO= "to";
	public static final String DATA_TRAFFIC_PARKID= "parkids";
	public static final String DATA_TRAFFIC_TRIPIDS= "tripids";
	public static final String DATA_TRAFFIC_ROAD= "road";
	public static final String DATA_TRAFFIC_PREDICT= "predict";
	public static final String DATA_TRAFFIC_FULL= "full";
	public static final String DATA_TRAFFIC_DURATION= "duration";
	public static final String DATA_TRAFFIC_DISTANCE= "distance";
	public static final String DATA_TRAFFIC_MOST_JAM= "most_jam";
	public static final String DATA_TRAFFIC_ROADS= "roads";
	
	public static final String DATA_RESOURCE_FACEID= "emoid";
	public static final String DATA_RESOURCE_RESID= "resid";
	public static final String DATA_RESOURCE_FORMAT= "format";
	public static final String DATA_RESOURCE_IMAGETYPE= "imagetype";
	public static final String DATA_RESOURCE_RESINFO= "resinfo";
	public static final String DATA_RESOURCE_RESLIST= "reslist";
	
	public static final String DATA_EXPERIENCE_EXPID = "expid";
	public static final String DATA_EXPERIENCE_EXPINFO = "expinfo";
	public static final String DATA_EXPERIENCE_EXPLIST = "explist";
	public static final String DATA_EXPERIENCE_USERLIST = "userlist";
	public static final String DATA_EXPERIENCE_PHOTOLIST = "photolist";
	public static final String DATA_EXPERIENCE_FACELIST = "facelist";
	public static final String DATA_EXPERIENCE_MANUFACTURERLIST = "manlist";
	public static final String DATA_EXPERIENCE_PRODLIST = "prodlist";
	public static final String DATA_EXPERIENCE_SERVLIST = "servlist";
	public static final String DATA_EXPERIENCE_ORDERLIST = "orderlist";
	public static final String DATA_EXPERIENCE_CASHFLOW = "cashflow";
	
	public static final String DATA_SMS_TOKEN= "vtoken";
	public static final String DATA_SMS_SERVJSON= "servjson";
	
	public static final String THIRDPARTY_SMS_ROUTE= "route";
	public static final String THIRDPARTY_SMS_ADDRESS= "address";
	public static final String THIRDPARTY_SMS_SIMPLIFY= "simplify";
	public static final String THIRDPARTY_SMS_POIS= "pois";
	
	
	public static final String DATA_USERCAR_LIST = "carlist";
	public static final String DATA_USERCAR_CARIDMAP = "caridmap";
	public static final String DATA_USERCAR_USERCAR = "usercar";
	
	public static final String DATA_CLUB_CAR = "clubcar";
	
	public static final String DATA_CLUB_CAR_PRICE = "clubprice";
	public static final String DATA_USERCAR_LASTINSURANCE = "lastinsurance";
	public static final String DATA_USERCAR_LASTMAINTAIN = "lastmaintain";
	
	public static final String DATA_USERCLUB_MUSTWRITE = "mustwrite";
	public static final String DATA_USERCLUB_BEFOREWRITE = "beforewrite";

	public static final String DATA_CAR_OUTERCOLORS = "outercolors";
	public static final String DATA_CAR_INNERCOLORS = "innercolors";
	
	public static final String DATA_CASH_PROD = "prod";
	
	public static final String DATA_CASH_PROD_TETAILS = "details";
	
	public static final String DATA_USERS_COUNT_BUY = "buycnt";
	
	public static final String DATA_USERS_BUY = "buyers";
	
	
	
	//request返回的类别==================================================================
	
	// add by chengjun RETURNTYPE_CODE      = "code";
    public final static String RETURNTYPE_CODE      = "errcode";
    // 
    public final static String RETURNTYPE_FLAG      = "flag";
    public final static String RETURNTYPE_DATA      = "data";
    public final static String RETURNTYPE_COST      = "cost";
    public final static String RETURNTYPE_INFO      = "info";
    public final static String RETURNTYPE_EX      = "ex";
    public final static String RETURNTYPE_SUCCESS   = "success";
    public final static String RETURNTYPE_ERRINFO   = "error";
    public final static String RETURNTYPE_STATUS    = "status";
    public final static String RETURNTYPE_MSG       = "msg";

    public final static int    NORMALCODE = 0;
    public final static int    USERRELOGINCODE = 8;		// 登录过期,会强制要求用户重新登录，不允许改变这个code
	public final static int    WECHAT_NOTBIND = 9;		// 微信绑定车盟账户，目标车盟账户不存在
	public final static int    ERR_TYPE_ALERT = 10;		// 强提醒类错误提示，客户端使用alert提示
    public final static int    ABNORMALCODE = -100;
    public final static int    ABNORMALCODE_HEAD = -200;
    public final static int    NORMALEMPTYCODE = 0;
    //  用户=1 车友会=2  车友会私密账户=3 官方=10
    public final static int    AMOUNT_TYPE_USER = 1;
    public final static int    AMOUNT_TYPE_CLUB = 2;
    public final static int    AMOUNT_TYPE_ACTIVITY = 4;
    public final static int    AMOUNT_TYPE_OFFICIAL = 10;
    
	// -1=无效，0=等待支付，1=已发出，2=已经抢完，3=过期
    public final static int    RED_STATUS_INIT = -1;
    public final static int    RED_STATUS_SEND = 1;
    public final static int    RED_STATUS_OVER = 2;
    public final static int    RED_STATUS_TIME = 3;

    public final static int    MESSAGE_QQIM_RED = 302;
    public final static int    MESSAGE_QQIM_RED_EXPR = 303;

	protected static Set<Long> cmtAccountSet = new HashSet<Long>();//官方账号集合
    // 官方账户
	public final static long USERID_SPEED_OFFICIAL = 62022508523779l;
	// 小秘书
	public final static long USERID_SPEED_XIAOMISHU = 60047136357277l;
	// 大秘书，各类话题聊天室群主
	public final static long USERID_SPEED_DAMISHU = 59059250618433l;
	// 车友会小秘书，车友会默认临时会长（无品牌车友会）
	public final static long USERID_SPEED_CLUB_OWNER = 58071603404342l;

	public final static String USERID_SPEED_SECRET = "f591e73d-f7e2-310f-9342-0133fc9e6f65";
	
	public final static String HACK_PHONE = "22222222222";

	// 车盟链管理后台登录账户
	public final static long USERID_CML_ADMIN = 59059250618433l;
    
    //request返回的消息=====================================================================
	
	public static final String MSG_COMMENT_FREQENCTPOST = "发言过于频繁" ;
	public static final String MSG_GALLERY_FREQENCTPOST = "提交过于频繁" ;
	
	public static final String MSG_USER_USERNOTEXIST = "用户不存在！" ;
	public static final String MSG_USER_USERANDPASSWORDNOTMATCH = "账户和密码不匹配！" ;
	public static final String MSG_USER_ALREADYREG = "该手机号可能已注册！" ;
	
	
	public static final String MSG_SMS_TIMEOUT = "验证码超时" ;
	public static final String MSG_SMS_CODENOTMATCH = "输入的验证码不匹配" ;
	public static final String MSG_SMS_NOCODE= "未成功获取过验证码" ;
	
   //JSON 校验=====================================================================
	public final static String VERIFY_YES = "yes";
	public final static String VERIFY_NO = "no";
	public final static String USER_VERIFY_TOKEN = "登陆失效，请重新登陆";
	public final static String USER_VERIFY_DEVICE = "这是台新设备，请重新登陆";
	public final static String USER_VERIFY_NOUSERFOUND = "无此用户，请检查账号";
	public final static String USER_VERIFY_INFONOTMATCH = "信息不全，请重新发送请求";
	public final static String USER_VERIFY_NOAUTH = "没有操作权限";
	public final static String USER_VERIFY_TIMEOUT = "上次的登陆状态已超时";
	public final static String USER_VERIFY_NOTGROUPOWNER = "只有群主可以操作";
	public final static String USER_VERIFY_NOTLONGINUSER = "不是登录用户本人";
	public final static String USER_VERIFY_SIGNFAIL = "请求验证失败，请尝试重新登录，并使用app最新版本";
	public final static String ALIPAY_VERIFY_SIGNFAIL = "支付宝验证失败";
	public final static String NOT_SAME_CLUB = "该功能只对车友会成员开放";
	
	//static 信息=====================================================================
	protected static Set<String> cmtTypeSet = new HashSet<String>();//评论点赞的类型
	public final static String CMTTYPE_GALLERY = "gallery";
	public final static String CMTTYPE_RESOURCE = "resid";
	public final static String CMTTYPE_EXPERIENCE = "expid";
	public final static String CMTTYPE_PROD = "prod";
	public final static String CMTTYPE_ANSWER = "answer";
	public final static String CMTTYPE_KART = "kart";
	public final static String CMTTYPE_NEWS = "news";
	public final static String CMTTYPE_COMMENT = "comment";		// 对评论点赞
	public final static String CMTTYPE_ROADMAP = "roadmap";		// 路书的点赞评论
	public final static String CMTTYPE_ACTIVITY = "activity";
	public final static String CMTTYPE_ARTICLE = "article";		// cml文章类型（不只是文章，只要article表有的，都使用这个type，包括文章+评论）

	public static Set<String> multipartKeyTYPE = new HashSet<String>();//multi类型
	public final static String MULTIPARTKEYTYPE_IMAGE = "image";
	public final static String MULTIPARTKEYTYPE_AUDIO = "audio";
	public final static String MULTIPARTKEYTYPE_VIDEO = "video";
	public final static String MULTIPARTKEYTYPE_STREAM = "stream";		// 视频类型，但是要求转为流媒体
	public final static String MULTIPARTKEYTYPE_FILE = "file";		// 通用文件
	
	public static Set<String> imgTypeSet = new HashSet<String>();//图片类型
	public final static String IMGTYPE_TRIP = "trip"; //旅程，ucar暂时不用
	public final static String IMGTYPE_AVATAR = "avatar"; //用户头像
	public final static String IMGTYPE_BACKGROUND = "bg"; //用户背景
	public final static String IMGTYPE_CLUBAVATAR = "clubavatar"; //俱乐部头像
	public final static String IMGTYPE_PHOTO = "photo"; //用户字段，photo
	public final static String IMGTYPE_GALLERY = "gimg"; //gallery 路上随拍
	public final static String IMGTYPE_GALLERYVIDEO = "gvid";//"galleryvideo"; //视频
	public final static String IMGTYPE_SYSTEM = "system"; //系统图标
	public final static String IMGTYPE_CAR = "car"; //用户车相关的证据、第一张照片，证明照片等
	public final static String IMGTYPE_CARSHARE = "carshare"; //用户上传的车身内饰等类型
	public final static String IMGTYPE_EXPERIENCE = "exp";	//汽车问答
	public final static String IMGTYPE_MAINTANACE= "mtn"; //保养指端
	public final static String IMGTYPE_FACE= "face"; //表情
	public final static String IMGTYPE_PRODUCT= "prod"; //商品
	public final static String IMGTYPE_ORDER= "order"; //订单
	public final static String IMGTYPE_SCENE= "scene"; //景点图片
	
	
	public final static int eSpeedJumpToNone = 0;
	public final static int eSpeedJumpToProfile = 1;
	public final static int eSpeedJumpToOrderProd = 2;
	public final static int eSpeedJumpToOrderShop = 3;
	public final static int eSpeedJumpToClubBe = 4;
	public final static int eSpeedJumpToClubFuli = 5;
	public final static int eSpeedJumpToClubBuy = 6;
	public final static int eSpeedJumpToClubIns = 7;
	public final static int eSpeedJumpToClubMaintain = 8;
	
	public final static int eSpeedJumpToRpCash = 100;
	public final static int eSpeedJumpToRpExp = 101;
	// 是指信息录入页，不是详情页
	public final static int eSpeedJumpToInfoBuy = 201;
	public final static int eSpeedJumpToInfoIns = 202;
	public final static int eSpeedJumpToInfoMaintain = 203;
	public final static int eSpeedJumpToInfoGallery = 204;
	public final static int eSpeedJumpToInfoCarExp = 205;
	// 信息详情页
	public final static int eSpeedJumpToDetailBuy = 301;
	public final static int eSpeedJumpToDetailIns = 302;
	public final static int eSpeedJumpToDetailMaintain = 303;
	public final static int eSpeedJumpToDetailGallery = 304;
	public final static int eSpeedJumpToDetailCarExp = 305;
	
	public final static int eSpeedJumpToDetailProdDetail = 306;
	public final static int eSpeedJumpToDetailShopDetail = 307;
	public final static int eSpeedJumpToDetailCarReport = 308;

	
	protected static Set<String> imgFormatSet = new HashSet<String>();//图片类型
	public final static String IMGFORMAT_PNG = "png";
	public final static String IMGFORMAT_JPG = "jpg";
	public final static String IMGFORMAT_JPEG = "jpeg";
	public final static String IMGFORMAT_MP4 = "mp4";
	public final static String IMGFORMAT_GIF = "gif";
	
	public static Set<String> coorSet = new HashSet<String>();//地图相关
    public final static String RETURNTYPE_COOR  = "coor";
    public final static String COOR_GPS         = "gps";
    public final static String COOR_BAIDU       = "baidu";
    public final static String COOR_MARS        = "mars";    
    public final static String SOURCE_BAIDU        = "baidu";
    public final static String SOURCE_GAODE        = "gaodo";
    public final static String SOURCE_USER        = "user";
    public final static String SOURCE_SYS        = "sys";
    
	public static Set<String> licenseTypeSet = new HashSet<String>();//认证证件类型
	public final static String LICENSETYPE_DRIVER= "userlicenseresid";
	public final static String LICENSETYPE_VEHICLE = "carlicenseresid";
	public final static String LICENSETYPE_CAR = "carresids";



	static{

			cmtAccountSet.add(USERID_SPEED_OFFICIAL);
			cmtAccountSet.add(USERID_SPEED_XIAOMISHU);
			cmtAccountSet.add(USERID_SPEED_DAMISHU);
			cmtAccountSet.add(USERID_CML_ADMIN);

	        cmtTypeSet.add(CMTTYPE_GALLERY);      
	        cmtTypeSet.add(CMTTYPE_RESOURCE);
	        cmtTypeSet.add(CMTTYPE_EXPERIENCE);
			cmtTypeSet.add(CMTTYPE_PROD);
			cmtTypeSet.add(CMTTYPE_ANSWER);
			cmtTypeSet.add(CMTTYPE_KART);
			cmtTypeSet.add(CMTTYPE_NEWS);
			cmtTypeSet.add(CMTTYPE_COMMENT);
	        cmtTypeSet.add(CMTTYPE_ROADMAP);
			cmtTypeSet.add(CMTTYPE_ACTIVITY);
			cmtTypeSet.add(CMTTYPE_ARTICLE);
	        
	        imgTypeSet.add(IMGTYPE_AVATAR);
	        imgTypeSet.add(IMGTYPE_BACKGROUND);
	        imgTypeSet.add(IMGTYPE_GALLERY);  
	        imgTypeSet.add(IMGTYPE_TRIP);
	        imgTypeSet.add(IMGTYPE_SYSTEM);
	        imgTypeSet.add(IMGTYPE_PHOTO);
	        imgTypeSet.add(IMGTYPE_GALLERYVIDEO);
	        imgTypeSet.add(IMGTYPE_CAR);
	        imgTypeSet.add(IMGTYPE_CARSHARE);
	        imgTypeSet.add(IMGTYPE_EXPERIENCE);
	        imgTypeSet.add(IMGTYPE_CLUBAVATAR);
	        imgTypeSet.add(IMGTYPE_MAINTANACE);
	        imgTypeSet.add(IMGTYPE_FACE);
	        imgTypeSet.add(IMGTYPE_PRODUCT);
			imgTypeSet.add(IMGTYPE_ORDER);
			imgTypeSet.add(IMGTYPE_SCENE);
	        imgTypeSet.add("test");
	        
	        imgFormatSet.add(IMGFORMAT_PNG);
	        imgFormatSet.add(IMGFORMAT_JPG);  
	        imgFormatSet.add(IMGFORMAT_JPEG);
	        imgFormatSet.add(IMGFORMAT_MP4);
	        imgFormatSet.add(IMGFORMAT_GIF);
	        
	        coorSet.add(COOR_GPS);
	        coorSet.add(COOR_BAIDU);
	        coorSet.add(COOR_MARS);
	        
	        multipartKeyTYPE.add(MULTIPARTKEYTYPE_IMAGE);
			multipartKeyTYPE.add(MULTIPARTKEYTYPE_AUDIO);
	        multipartKeyTYPE.add(MULTIPARTKEYTYPE_VIDEO);
			multipartKeyTYPE.add(MULTIPARTKEYTYPE_STREAM);
			multipartKeyTYPE.add(MULTIPARTKEYTYPE_FILE);
	        
	        licenseTypeSet.add(LICENSETYPE_DRIVER);
	        licenseTypeSet.add(LICENSETYPE_VEHICLE);
	        licenseTypeSet.add(LICENSETYPE_CAR);
	    }	

	public final static String FileDIR_Image = "images";
	public final static String FileDIR_Video = "video";
	public final static String FileDIR_Audio = "audio";
	public final static String FileDIR_HLS = "hls";
	public final static String FileDIR_Data_Default = "/root/tomcat/data";
	
	public final static String KEYINFO = "[keyinfo]>>";

}
